﻿@model IEnumerable<WebVideo.EntitySupportAdmin>
<div class="widget-content chatMsg contScroll" id ="ChatBoxAdmin">

@{
    var AvataAdmin = "~/Content/Images/Avatar/AdminAvatar.jpg";
    var AvataUser = "~/Content/Images/Avatar/no-image.jpg";
    if (System.Web.HttpContext.Current.Request.Cookies["userId"] != null && System.Web.HttpContext.Current.Request.Cookies["UserAvatar"] != null)
    {
         AvataUser = "~/Content/Images/Avatar/" + Request.Cookies["UserAvatar"].Value;
    }
  
    foreach (var item in Model)
    {

        if (item.IdRoot == Request.Cookies["userId"].Value)
        {
            <div class="it receive">
                
            <div class="avatar"><img src="@Url.Content(AvataAdmin)" /></div>
                 <div class="textWrap">
                      <div class="textInner">
                           @item.Contents
                      </div>
                 </div>
            </div>
        }
        else
        {
            <div class="it">
                <div class="avatar"><img src="@Url.Content(AvataUser)" /></div>
                     <div class="textWrap">
                          <div class="textInner">
                               @item.Contents
                          </div>
                 </div>
            </div><!--/ .it-->
        }
        
    }
}
 </div><!--/ .widget-content-->
<div class="widget-content chatAction">
     <div class="input-append">
         <form>
              <input class="span2" id="appendedInputButton" type="text" placeholder="Nhập yêu cầu...">
             <button class="btn" type="submit" onclick="return LienHe();">Gửi!</button>
         <input type="hidden" value ="@Request.Cookies["userId"].Value" id ="userId"/>
          <input type="hidden" value ="@Request.Cookies["userAvatar"].Value" id ="userAvatar"/>
     </form>
     </div>
</div><!--/ .widget-content-->
